package vfs.dao;

import java.io.Serializable;

public class PathPK implements Serializable {

    private static final long serialVersionUID = 1L;


    private long descendant;
    private long ancestor;

    public PathPK() {}

    public long getDescendant() {
        return descendant;
    }

    public long getAncestor() {
        return ancestor;
    }

    public boolean equals(Object obj) {
        if ( !(obj instanceof PathPK)) {
            return false;
        }

        PathPK ppk = (PathPK) obj;

        return (this.ancestor == ppk.ancestor) && (this.descendant == ppk.descendant);

    }

    public int hashCode() {
        return String.valueOf(this.ancestor).hashCode() ^
            String.valueOf(this.descendant).hashCode();
    }
}
